home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / updates / update31.zoo / libg++ / src / diffs
Encoding:
Text File  |  1993-05-29  |  8.1 KB  |  360 lines

  1. *** 1.13    1993/03/29 03:53:00
  2. --- Changelo    1993/05/29 21:19:53
  3. ***************
  4. *** 308,310 ****
  5. --- 308,315 ----
  6.       this problem (see patch to config/m68k.md)
  7.   
  8.   ---------------------------- Patchlevel 18 -----------------------------------
  9. + filebuf.cc floatcon.cc outfloat.cc streambu.cc xinteger.cc 
  10. + xrationa.cc iomanip.h streambu.h :: ++jrb
  11. +     sync up with libg++ 2.3.1
  12. + ---------------------------- Patchlevel 19 -----------------------------------
  13. *** 1.13    1993/03/29 03:53:00
  14. --- PatchLev.h    1993/05/29 21:19:54
  15. ***************
  16. *** 1,5 ****
  17.   
  18. ! #define    PatchLevel "18"
  19.   
  20.   /*
  21.    *    the Patch Level above is to identify the version
  22. --- 1,5 ----
  23.   
  24. ! #define    PatchLevel "19"
  25.   
  26.   /*
  27.    *    the Patch Level above is to identify the version
  28. *** 1.10    1993/02/05 04:59:04
  29. --- filebuf.cc    1993/05/29 21:19:56
  30. ***************
  31. *** 195,201 ****
  32.       }
  33.       if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {
  34.       omode = O_RDWR;
  35. !     read_write = 0;
  36.       }
  37.       int fdesc = ::open(filename, omode|oflags, oprot);
  38.       if (fdesc < 0)
  39. --- 195,201 ----
  40.       }
  41.       if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {
  42.       omode = O_RDWR;
  43. !     read_write &= _S_IS_APPENDING;
  44.       }
  45.       int fdesc = ::open(filename, omode|oflags, oprot);
  46.       if (fdesc < 0)
  47. ***************
  48. *** 287,296 ****
  49.       // Flush all line buffered files before reading.
  50.       streambuf::flush_all_linebuffered();
  51.       }
  52. ! #if 1
  53. !     if (pptr() > pbase())
  54. !     if (do_flush()) return EOF;
  55. ! #endif
  56.   
  57.       _G_ssize_t count = sys_read(base(), ebuf() - base());
  58.       if (count <= 0) {
  59. --- 287,294 ----
  60.       // Flush all line buffered files before reading.
  61.       streambuf::flush_all_linebuffered();
  62.       }
  63. !     switch_to_get_mode();
  64.   
  65.       _G_ssize_t count = sys_read(base(), ebuf() - base());
  66.       if (count <= 0) {
  67. ***************
  68. *** 329,340 ****
  69.       _G_ssize_t count = sys_write(data, to_do);
  70.       if (_cur_column)
  71.       _cur_column = __adjust_column(_cur_column - 1, data, to_do) + 1;
  72. -     if (count != to_do)
  73. -     return EOF;
  74.       setg(base(), base(), base());
  75.       if (xflags() & _S_LINE_BUF+_S_UNBUFFERED) setp(base(), base());
  76.       else setp(base(), ebuf());
  77. !     return 0;
  78.   }
  79.   
  80.   int filebuf::sync()
  81. --- 327,336 ----
  82.       _G_ssize_t count = sys_write(data, to_do);
  83.       if (_cur_column)
  84.       _cur_column = __adjust_column(_cur_column - 1, data, to_do) + 1;
  85.       setg(base(), base(), base());
  86.       if (xflags() & _S_LINE_BUF+_S_UNBUFFERED) setp(base(), base());
  87.       else setp(base(), ebuf());
  88. !     return count != to_do ? EOF : 0;
  89.   }
  90.   
  91.   int filebuf::sync()
  92. *** 1.1    1993/01/17 03:34:31
  93. --- floatcon.cc    1993/05/29 21:19:57
  94. ***************
  95. *** 2005,2011 ****
  96.                                   i = 1;
  97.                   }
  98.           j = sizeof(unsigned long);
  99. !         for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j < i;
  100.                   j <<= 1) result_k++;
  101.           result = Balloc(result_k);
  102.           s = s0 = (char *)result;
  103. --- 2005,2011 ----
  104.                                   i = 1;
  105.                   }
  106.           j = sizeof(unsigned long);
  107. !         for(result_k = 0; sizeof(Bigint) - sizeof(unsigned long) + j <= i;
  108.                   j <<= 1) result_k++;
  109.           result = Balloc(result_k);
  110.           s = s0 = (char *)result;
  111. *** 1.4    1993/02/05 04:59:04
  112. --- outfloat.cc    1993/05/29 21:20:04
  113. ***************
  114. *** 141,147 ****
  115.       // Calculate the width (before padding).
  116.       int unpadded_width =
  117.       (print_sign != 0) + trailing_zeroes + exponent_size + show_dot
  118. !         + useful_digits + (decpt > 0 ? 0 : 1 - decpt);
  119.   
  120.       int padding = width > unpadded_width ? width - unpadded_width : 0;
  121.       if (padding > 0
  122. --- 141,149 ----
  123.       // Calculate the width (before padding).
  124.       int unpadded_width =
  125.       (print_sign != 0) + trailing_zeroes + exponent_size + show_dot
  126. !         + useful_digits
  127. !         + (decpt > useful_digits ? decpt - useful_digits
  128. !            : decpt > 0 ? 0 : 1 - decpt);
  129.   
  130.       int padding = width > unpadded_width ? width - unpadded_width : 0;
  131.       if (padding > 0
  132. *** 1.8    1993/02/05 04:59:04
  133. --- streambu.cc    1993/05/29 21:20:07
  134. ***************
  135. *** 669,674 ****
  136. --- 669,675 ----
  137.   
  138.   int backupbuf::pbackfail(int c)
  139.   {
  140. +   if (_gptr <= _eback) {
  141.       // Need to handle a filebuf in write mode (switch to read mode).  FIXME!
  142.   
  143.       if (have_backup() && !in_backup()) {
  144. ***************
  145. *** 694,703 ****
  146.       setg(new_buf, new_buf+(new_size-old_size), new_buf+new_size);
  147.       _aux_limit = _gptr;
  148.       }
  149. !     _gptr--;
  150. !     if (c != EOF && *_gptr != c)
  151. !     *_gptr = c;
  152. !     return (unsigned char)*_gptr;
  153.   }
  154.   
  155.   unsigned __adjust_column(unsigned start, const char *line, int count)
  156. --- 695,705 ----
  157.       setg(new_buf, new_buf+(new_size-old_size), new_buf+new_size);
  158.       _aux_limit = _gptr;
  159.       }
  160. !   }
  161. !   _gptr--;
  162. !   if (c != EOF && *_gptr != c)
  163. !     *_gptr = c;
  164. !   return (unsigned char)*_gptr;
  165.   }
  166.   
  167.   unsigned __adjust_column(unsigned start, const char *line, int count)
  168. *** 1.8    1992/12/14 19:14:32
  169. --- xinteger.cc    1993/05/29 21:20:10
  170. ***************
  171. *** 31,39 ****
  172.   #include <xinteger.h>
  173.   #include <std.h>
  174.   #include <ctype.h>
  175. - #include <math.h>
  176.   #include <float.h>
  177.   #include <limits.h>
  178.   #include <xobstack.h>
  179.   #include <xallocri.h>
  180.   #include <new.h>
  181. --- 31,39 ----
  182.   #include <xinteger.h>
  183.   #include <std.h>
  184.   #include <ctype.h>
  185.   #include <float.h>
  186.   #include <limits.h>
  187. + #include <math.h>
  188.   #include <xobstack.h>
  189.   #include <xallocri.h>
  190.   #include <new.h>
  191. ***************
  192. *** 327,333 ****
  193.   
  194.   IntRep* Icopy_zero(IntRep* old)
  195.   {
  196. !   if (old == 0)
  197.       return &_ZeroRep;
  198.   
  199.     old->len = 0;
  200. --- 327,333 ----
  201.   
  202.   IntRep* Icopy_zero(IntRep* old)
  203.   {
  204. !   if (old == 0 || STATIC_IntRep(old))
  205.       return &_ZeroRep;
  206.   
  207.     old->len = 0;
  208. ***************
  209. *** 2315,2321 ****
  210.     s >> ws;
  211.     if (!s.good())
  212.     {
  213. !     s.set(_fail);
  214.       return s;
  215.     }
  216.     
  217. --- 2315,2321 ----
  218.     s >> ws;
  219.     if (!s.good())
  220.     {
  221. !     s.set(ios::failbit);
  222.       return s;
  223.     }
  224.     
  225. ***************
  226. *** 2395,2401 ****
  227.     if (s.good())
  228.       s.putback(ch);
  229.     if (!got_one)
  230. !     s.set(_fail);
  231.   
  232.     if (sgn == '-')
  233.       y.negate();
  234. --- 2395,2401 ----
  235.     if (s.good())
  236.       s.putback(ch);
  237.     if (!got_one)
  238. !     s.set(ios::failbit);
  239.   
  240.     if (sgn == '-')
  241.       y.negate();
  242. ***************
  243. *** 2425,2428 ****
  244.   {
  245.     (*lib_error_handler)("Integer", msg);
  246.   }
  247. --- 2425,2427 ----
  248. *** 1.4    1992/06/03 02:12:17
  249. --- xrationa.cc    1993/05/29 21:20:11
  250. ***************
  251. *** 216,229 ****
  252.   {
  253.     Integer r;
  254.     divide(x.num, x.den, q, r);
  255. !   if (sign(x.num) < 0 && sign(r) != 0) q--;
  256.   }
  257.   
  258.   Integer ceil(const Rational& x) return q
  259.   {
  260.     Integer  r;
  261.     divide(x.num, x.den, q, r);
  262. !   if (sign(x.num) >= 0 && sign(r) != 0) q++;
  263.   }
  264.   
  265.   Integer round(const Rational& x) return q
  266. --- 216,229 ----
  267.   {
  268.     Integer r;
  269.     divide(x.num, x.den, q, r);
  270. !   if (sign(x.num) < 0 && sign(r) != 0) --q;
  271.   }
  272.   
  273.   Integer ceil(const Rational& x) return q
  274.   {
  275.     Integer  r;
  276.     divide(x.num, x.den, q, r);
  277. !   if (sign(x.num) >= 0 && sign(r) != 0) ++q;
  278.   }
  279.   
  280.   Integer round(const Rational& x) return q
  281. ***************
  282. *** 234,242 ****
  283.     if (ucompare(r, x.den) >= 0)
  284.     {
  285.       if (sign(x.num) >= 0)
  286. !       q++;
  287.       else
  288. !       q--;
  289.     }
  290.   }
  291.   
  292. --- 234,242 ----
  293.     if (ucompare(r, x.den) >= 0)
  294.     {
  295.       if (sign(x.num) >= 0)
  296. !       ++q;
  297.       else
  298. !       --q;
  299.     }
  300.   }
  301.   
  302. ***************
  303. *** 291,297 ****
  304.     Integer q;
  305.     Integer r;
  306.     divide(x.num, x.den, q, r);
  307. !   if (sign(x.num) < 0 && sign(r) != 0) q--;
  308.     return q;
  309.   }
  310.   
  311. --- 291,297 ----
  312.     Integer q;
  313.     Integer r;
  314.     divide(x.num, x.den, q, r);
  315. !   if (sign(x.num) < 0 && sign(r) != 0) --q;
  316.     return q;
  317.   }
  318.   
  319. ***************
  320. *** 300,306 ****
  321.     Integer q;
  322.     Integer  r;
  323.     divide(x.num, x.den, q, r);
  324. !   if (sign(x.num) >= 0 && sign(r) != 0) q++;
  325.     return q;
  326.   }
  327.   
  328. --- 300,306 ----
  329.     Integer q;
  330.     Integer  r;
  331.     divide(x.num, x.den, q, r);
  332. !   if (sign(x.num) >= 0 && sign(r) != 0) ++q;
  333.     return q;
  334.   }
  335.   
  336. ***************
  337. *** 313,321 ****
  338.     if (ucompare(r, x.den) >= 0)
  339.     {
  340.       if (sign(x.num) >= 0)
  341. !       q++;
  342.       else
  343. !       q--;
  344.     }
  345.     return q;
  346.   }
  347. --- 313,321 ----
  348.     if (ucompare(r, x.den) >= 0)
  349.     {
  350.       if (sign(x.num) >= 0)
  351. !       ++q;
  352.       else
  353. !       --q;
  354.     }
  355.     return q;
  356.   }
  357.